﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Tong;


public partial class aspnet_testPargrameDir_site_ascx_AboutUs : System.Web.UI.UserControl
{
    public string str = "";



    /// <summary>
    /// 用於顯示資料
    /// </summary>
    public Tong.TongUse TextData = new Tong.TongUse();

    /// <summary>
    /// 系统安装绝对路径
    /// </summary>
    public string Abs_Path = TongUse.SysPath;
    /// <summary>
    /// 用户存放数据的临时表
    /// </summary>
    DataTable MyDt = new DataTable();


    /// <summary>
    /// 站点通用方法类
    /// </summary>
    public Tong.ThisSiteUse.SiteTong TextThisSite = new Tong.ThisSiteUse.SiteTong();

    /// <summary>
    /// 當前顯示的id
    /// </summary>
    string id = "1";
    //得到传入的栏目ID
    public String CloumnID = "75";
    //得到传入的栏目ID
    public String SendentID = "80";
    /// <summary>
    /// 欄目目錄
    /// </summary>
    public string CX_Column_Directory = "";

    /// <summary>
    /// 顯示當前欄目的簡介
    /// </summary>
    public string str1 = "";
    /// <summary>
    /// 資料表
    /// </summary>
    DataTable NewDt = new DataTable();
    /// <summary>
    /// 生成静态页面
    /// </summary>
    public bool html = true;

    public string tab = "CX_Column";

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["html"]))
        {
            bool.TryParse(Request.QueryString["html"], out  html);
        }

        BindData();
    }

    /// <summary>
    ///邦定當前頁面的資料
    /// </summary>
    void BindData()
    {
  
            try
            {
                CloumnID = Request.QueryString["CloumnID"].Trim();
            }
            catch { }
 

        //默认中文版
        if (CloumnID == "1")
        {
            CloumnID = "75";
        }

        try
        {

            SendentID = Request.QueryString["SendentID"].Trim();
        }
        catch
        {
            try
            {
                SendentID = Request.QueryString["CloumnID"].Trim();
            }
            catch { }
        }


        var dt = TextThisSite.GetPointColumns(CloumnID, 0);
        if (dt.Rows.Count > 4)
        {
            var rows = dt.Rows;
            rows.RemoveAt(rows.Count - 1);
        }
        //得到所有栏目
        RepeaterQuality_contral.DataSource = dt;
        RepeaterQuality_contral.DataBind();

    }
}